<?php
@include('include/common.inc.php');	
/**************浏览的cookie*******************/
$Cookie_7 = $_COOKIE['Cookie_7_Id'];
if(empty($Cookie_7))
{
	$Cookie_7= 0;
}else{
	$cookie7 = explode(',',$Cookie_7);
	$count7 = count($cookie7);
	if($count7>4)
	{
			$Cookie_7 = $cookie7[0].','.$cookie7[1].','.$cookie7[2].','.$cookie7[3].','.$cookie7[4];
	}elseif($count7==4){
			$Cookie_7 = $cookie7[0].','.$cookie7[1].','.$cookie7[2].','.$cookie7[3];
	}elseif($count7==3){
			$Cookie_7 = $cookie7[0].','.$cookie7[1].','.$cookie7[2];
	}elseif($count7==2){
			$Cookie_7 = $cookie7[0].','.$cookie7[1];
	}elseif($count7==1){
			$Cookie_7 = $cookie7[0];
	}
}
$sql_Cookie_7 = "select * from $TBL_HOUSE where id in($Cookie_7) limit 5";   
$res_Cookie_7 =$db->query($sql_Cookie_7);
while($rows = $db->fetch_array($res_Cookie_7))
{
	if($rows['hou_type']==1)
	{
		$rows['titlex'] ='租金';
	}elseif($rows['hou_type']==2){
		$rows['titlex'] ='賣價';
	}else{
		$rows['titlex'] ='賣價';
	}
	$rows['ADDR']=FSubstr(str_replace("&nbsp;","",strip_tags($rows[address])),0,20);
	$rows['TIT']=FSubstr(str_replace("&nbsp;","",strip_tags($rows[title])),0,26);
	$row1[]=$rows;
}
/*********************************/

//cookie
$smarty->assign("row1",$row1);
@include('number.php');//验证码
$smarty->display('search.html');
?>